﻿namespace Wedn.Model.Data
{
    /// <summary>
    /// 拓展元数据实体模型类(初步审核通过)
    /// </summary>
    public class Meta
    {
        #region 所有字段
        private int id;
        private int objectId;
        private string objectType;
        private string key;
        private string value;
        private string description;
        #endregion

        #region 对外公共属性
        /// <summary>
        /// 拓展属性表主键
        /// </summary>
        public int Id
        {
            get { return id; }
            set { id = value; }
        }
        /// <summary>
        /// 对应对象ID
        /// </summary>
        public int ObjectId
        {
            get { return objectId; }
            set { objectId = value; }
        }
        /// <summary>
        /// 拓展属性类型(user|post...)
        /// </summary>
        public string ObjectType
        {
            get { return objectType; }
            set { objectType = value; }
        }
        /// <summary>
        /// 拓展属性名称
        /// </summary>
        public string Key
        {
            get { return key; }
            set { key = value; }
        }
        /// <summary>
        /// 拓展属性值
        /// </summary>
        public string Value
        {
            get { return this.value; }
            set { this.value = value; }
        }
        /// <summary>
        /// 拓展属性描述说明
        /// </summary>
        public string Description
        {
            get { return description; }
            set { description = value; }
        }
        #endregion

        #region 构造函数
        public Meta() { }
        /// <summary>
        /// 拓展元数据实体模型类构造函数
        /// </summary>
        /// <param name="id">拓展属性ID</param>
        /// <param name="objectId">对象ID</param>
        /// <param name="objectType">对象类型</param>
        /// <param name="key">属性名</param>
        /// <param name="value">属性值</param>
        /// <param name="description">属性描述说明</param>
        public Meta(int id, int objectId, string objectType, string key, string value, string description)
        {
            this.id = id;
            this.objectId = objectId;
            this.objectType = objectType;
            this.key = key;
            this.value = value;
            this.description = description;
        } 
        #endregion
    }
}
